home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / APW.ORCA.Cmds / Matts.Utils / UTILITIES / HELP / MESSAGES next >
Encoding:
Text File  |  1990-06-24  |  1.9 KB  |  65 lines  |  [ p?/pdos]

  1. MESSAGES [no parameters]
  2. by Matt Deatherage
  3.  
  4. Messages places information about a Tool Locator MessageCenter "files" message
  5. (a message of type 1) into several shell variables.  You can use messages in
  6. your login script to manage files opened from the Finder or other program
  7. selectors.
  8.  
  9. The variables are:
  10. * echo {MsgAction} {MsgFT} {MsgAT} {MsgPath} {MsgStamp} {MsgPrefix}
  11.  
  12. {MsgAction} is "Open", "Print", or a 5-character decimal string representing
  13. other message actions.  For example, action $0003 would be "    3".
  14.  
  15. {MsgFT} is the file type of the first file in the message (usually $B0, SRC).
  16.  
  17. {MsgAT} is the auxiliary type of the first file in the message.  This is the
  18. APW language number.
  19.  
  20. {MsgPath} is the pathname of the first file in the message, exactly as in the
  21. message itself.  It is not expanded or processed.
  22.  
  23. {MsgStamp} contains the language name for the first file in the message, such
  24. as "REZ" or "ASM65816".  This variable will only be set if you are using
  25. version 1.1 or greater of the APW/ORCA shell.
  26.  
  27. {MsgPrefix} contains a the full, expanded pathname of the first file in the
  28. message without the file name.  You can pass this as the argument to "prefix"
  29. to set the directory to that of the file in the message.
  30.  
  31. Here's a script example using both MESSAGES and MODIFIERS.  This is my actual
  32. login script.
  33.  
  34. asm65816
  35. alias e edit
  36. alias cd prefix
  37. echo you have the following aliases:
  38. alias
  39. messages
  40. if {MsgAction} == "None"
  41.     modifiers
  42.     If {Option} == "1"
  43.              echo "Setting prefix to 'SA'"
  44.              cd /hd/apw/sa
  45.     end
  46.     If {OpenApple} == "1"
  47.              echo "Launching Prizm..."
  48.              prizm
  49.              modifiers
  50.              if {OpenApple} =="1"
  51.                 Echo "Quitting to Finder..."
  52.                 quit
  53.              end
  54.     end
  55. else
  56.     prefix {MsgPrefix}
  57.     if {MsgAction} == "Print"
  58.          print {MsgPath}
  59.     else if {MsgStamp} == "EXEC"
  60.          execute {MsgPath}
  61.     else
  62.          edit {MsgPath}
  63.     end
  64. end
  65.